import type { BookType, Range } from 'xlsx'
type ResultsItem = {
  name: string
  age: string
  hobby: string
  [key: string]: number | string
}
type Results = Array<ResultsItem>
type Header = Array<string>
interface ExcelData {
  header: Header
  results: Results
}
type Rack = {
  id?: number
  name: string
  age: string
  hobby: string
  createdTime?: number
}

interface JsonToExcelData {
  header?: Array<string>
  multiHeader?: Array<Array<string>>
  data: Array<Array<string | number>>
  filename?: string
  merges?: Array<any>
  autoWidth?: boolean
  bookType?: BookType
}
interface Cell {
  v: any
  t?: any
  z?: any
}
interface Ws {
  ['!ref']: string
  ['!merge']: Array<Range>
  [key: string]: any
}
export type { ResultsItem, Results, Header, ExcelData, Rack, JsonToExcelData, Cell, Ws }
